package com.example.demo11;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.transaction.event.TransactionPhase;
import org.springframework.transaction.event.TransactionalEventListener;

/**
 * @author renyitong
 * @version 1.0.0
 * @createTime 2025年09月29日
 * @Description
 */
@Component
@Slf4j
public class TransactionalListenerSC {

    @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
    public void test(MyEvent myEvent) {
        log.info("TransactionalListenerSC=> {}", myEvent.getMsg());
    }

}
